#include "cThread.h"

cThread::cThread(bool autoStart)
{
    if(autoStart)
        HandleThread=CreateThread(0, 0, Start, this, 0, 0);
    else
        HandleThread=CreateThread(0, 0, Start, this, CREATE_SUSPENDED, 0);
}


DWORD WINAPI cThread::Start(void * params)
{
    cThread * test=(cThread*)params;
    test->doJob();
    return 0;
}

cThread::~cThread()
{

}


void cThread::Start()
{
    ResumeThread(HandleThread);
}

